package com.ke.searchhouse.util;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
/**
 * @author  keke
 * @create  2018/10/14 0014 下午 8:48
 * @desc 通用多结果Service返回结构
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ServiceMultiResult<T> {
    private long total;
    private List<T> result;


    public int getResultSize() {
        if (this.result == null) {
            return 0;
        }
        return this.result.size();
    }
}
